<%@ page import="javax.sql.*"%>
<%@ page import="java.util.*"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html:html>
	<head>
		<bean:define id="first" name="fname" />
		<bean:define id="middle" name="mname" />
		<bean:define id="last" name="lname" />
		<bean:define id="citizen" name="citizen" />
		<bean:define id="residence" name="residence" />
		<bean:define id="address" name="address" />
		<bean:define id="city" name="city" />
		<bean:define id="zip_code" name="zip_code" />
		<bean:define id="area_code" name="area_code" />
		<bean:define id="telephone" name="telephone" />
		<bean:define id="residency" name="residency" />
		<bean:define id="specialization" name="specialization" />
		<bean:define id="admission" name="admission" />
	
		<html:base />
		<link rel="stylesheet" type="text/css" href="../resources/style.css" media="screen"/>

		<title><bean:message key="reviewer.title" /></title>
		
	</head>
	
	
	<body>
		<p class="sansserif">
		<div class="container">
		<div class="center_div">
			<table>
			<tr>
				<td><b><bean:message key="student.application.title" /></b></td>
				<td></td><td></td><td></td>
				<td><a href="../invalidate.jsp">Logout</a></td>
			</tr>
			<tr>
			</tr>
			</table>
			<ul class="none">
				<li>Status: <i><bean:write name="admission"/></i></li>
			</ul>
			
			<p><b><bean:message key="student.application.header" /></b></p>
			<ul class="none">
				<li>
					Name: 
						<bean:write name="first"/>
						<bean:write name="middle"/>
						<bean:write name="last"/>
				</li>
				<li>Citizenship: <bean:write name="citizen"/></li>
				<li>Residence: <bean:write name="residence"/></li>
				<li>Address: 
					<bean:write name="address"/> <bean:write name="city"/>
					<bean:write name="zip_code"/>
				</li>
				<li>Telephone: <bean:write name="area_code"/> 
								<bean:write name="telephone"/></li>
				<li>Residency: <bean:write name="residency"/></li>
			</ul>
			<ul class="none">
				<li>Specialization: <bean:write name="specialization"/></li>
			</ul>

			<ul class="none">
			<li><b>Degrees</b></li>
			<logic:iterate id="degree" name="degrees" indexId="counter">
				<li>
					Location: <i><bean:write name="degree" property="location"/></i>, 
					University: <i><bean:write name="degree" property="university"/></i>
				</li>
				<li>
					Major: <i><bean:write name="degree" property="major"/></i>, 
					Graduation: <i><bean:write name="degree" property="month"/></i>/<i><bean:write name="degree" property="year"/></i>, 
					GPA: <i><bean:write name="degree" property="gpa"/></i>, 
					Title: <i><bean:write name="degree" property="title"/></i>
				</li>
				<li>
					Transcript: <i><bean:write name="degree" property="filename"/></i>, 
					<i><bean:write name="degree" property="filesize"/></i> bytes
				</li>
				<br>
			</logic:iterate>	
			</ul>

			<% RowSet otherReviews = (RowSet)request.getAttribute("otherReviews"); %>
			
			<p><b>Other reviewers grades and comments: </b></p>
			<% while(otherReviews.next())
				{
			%>
				<ul>
					<li>Grade: <%=otherReviews.getInt("grade") %></li>
					<li>Comment: <%= otherReviews.getString("comment") %></li>
				</ul>
			<%
				}
			%>
			<html:form action="/submitReview">
				<ul class="none">
				<li>Submit your grade: 
					<html:select property="grade">
					<html:option value="1"></html:option>
					<html:option value="2"></html:option>
					<html:option value="3"></html:option>
					<html:option value="4"></html:option>		
					</html:select>
					<html:submit value="Submit" />
				</li>
				<li>Comment: </li>
				<li>
					<html:textarea property="comment" rows="5" cols="50"/>
				</li>
				</ul>
			

			
			</html:form>
			
		</div>
		</div>
	</body>
</html:html>